# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
# Contributor: Niklas Holm <jadedcyborg@gmail.com>

# Order is important, primary package first
declare -rga _realname=(perl perl-doc)
pkgname=()
declare -gA _pkgname=()
for _n in "${_realname[@]}"; do
    _p="${MINGW_PACKAGE_PREFIX}-${_n}"
    _pkgname["${_n}"]="${_p}"
    pkgname+=("${_p}")
done
readonly _pkgname
pkgbase="mingw-w64-${_realname}"
# If you are upgrading to a new version, please run setup_perl_dirs.sh on the
# (patched) source tree to update hard-coded path values. If there are any
# changes, update the exisitng patches or add a new one.
#
# Run updpkgprovs after the package is built and installed to update the
# provides array, then repackage.
pkgver="5.32.1"
#       v    ^
pkgrel=6
pkgdesc="A highly capable, feature-rich programming language (mingw-w64)"
url="https://www.perl.org"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=("Artistic-1.0-Perl" "GPL-1.0-or-later")
options=("staticlibs" "strip" "docs" "!purge" "emptydirs")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
             "${MINGW_PACKAGE_PREFIX}-make"
             $([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || \
                echo "${MINGW_PACKAGE_PREFIX}-gcc-compat"))
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-winpthreads")
optdepends=("${MINGW_PACKAGE_PREFIX}-make: for using cpan")
source=("https://www.cpan.org/src/5.0/${_realname}-${pkgver}.tar.xz"
        "perlprofile.in"
        "perlinstall.in"
        "001-fhs-directory-structure.patch"
        "002-relocate-html-documentation.patch"
        "003-replace-batch-scripts-with-bare-perl.patch"
        "004-fix-cpan-external-programs.patch"
        "005-rename-cpan-home.patch"
        "006-generate-manpages.patch"
        "007-use-winsock-socket-functions.patch"
        "008-ucrt-stdio-internals.patch"
        "009-link-shared.patch"
        "010-mingw-w64-triplet.patch"
        "011-remove-s-compile-flag.patch"
        "012-errno-gen-reduce-includes.patch"
        "013-no-explib.patch"
        "014-no-description-in-def.patch"
        "015-noreturn.patch"
        "016-memory-alignment.patch"
        "017-arm64.patch"
        "018-copy-clang-runtime.patch")
## Populated by the updpkgprovs script
provides=(
    "${MINGW_PACKAGE_PREFIX}-perl-_charnames=1.480.0"
    "${MINGW_PACKAGE_PREFIX}-perl-amiga-arexx=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-amiga-exec=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-anydbm_file=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-cpan=1.675.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state-result=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state-result-test=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar-constant=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar-file=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-attribute-handlers=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-attributes=0.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception-system=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-hints=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-scope-guard=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-scope-guardstack=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-skip=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-util=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autoloader=5.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autosplit=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autouse=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b=1.800.0"
    "${MINGW_PACKAGE_PREFIX}-perl-base=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-concise=1.4.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-deparse=1.540.0"
    "${MINGW_PACKAGE_PREFIX}-perl-benchmark=1.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigint=0.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bignum=0.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigrat=0.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-blib=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-op_private=5.32.1"
    "${MINGW_PACKAGE_PREFIX}-perl-b-showlex=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-terse=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-xref=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bytes=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-carp=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-carp-heavy=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-charnames=1.480.0"
    "${MINGW_PACKAGE_PREFIX}-perl-class-struct=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-raw-bzip2=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-raw-zlib=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-zlib=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-config=5.32.1"
    "${MINGW_PACKAGE_PREFIX}-perl-config-extensions=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-config-perl-v=0.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-constant=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-author=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-bundle=5.500.500"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-cachemgr=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-complete=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-debug=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-deferredcode=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distribution=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distroprefs=6.0.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distrostatus=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-blocked_urllist=1.1.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-recursivedependency=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-yaml_not_installed=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-yaml_process_error=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-firsttime=5.531.400"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-ftp=5.501.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-ftp-netrc=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-handleconfig=5.501.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-http-client=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-http-credentials=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-index=2.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-infoobj=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-kwalify=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-lwp-useragent=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-converter=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-feature=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-history=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-merge=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-prereqs=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-requirements=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-spec=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-validator=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-yaml=0.18.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-mirrors=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-module=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-nox=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-plugin=0.970.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-plugin-specfile=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-prompt=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-queue=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-shell=5.500.900"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-tarzip=5.501.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-url=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-version=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cwd=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-data-dumper=2.174.10"
    "${MINGW_PACKAGE_PREFIX}-perl-db_file=1.853.0"
    "${MINGW_PACKAGE_PREFIX}-perl-db=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-compress=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-encode=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-int32=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-null=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-utf8=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-deprecate=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-peek=1.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-ppport=3.570.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-selfstubber=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-diagnostics=1.370.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest=1.170.100"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-base=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-md5=2.550.100"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-sha=6.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dirhandle=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dumpvalue=1.210.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dynaloader=1.470.100"
    "${MINGW_PACKAGE_PREFIX}-perl-encode=3.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-alias=2.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-byte=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cjkconstants=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cn=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cn-hz=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-config=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-ebcdic=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-encoder=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-encoding=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-gsm0338=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-guess=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp-h2z=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp-jis7=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-kr=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-kr-2022_kr=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-header=2.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-header-iso_2022_jp=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-name=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-symbol=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-tw=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-unicode=2.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-unicode-utf7=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding=3.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding-warnings=0.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-english=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-env=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-errno=1.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-experimental=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-exporter=5.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-exporter-heavy=5.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-base=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-aix=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-android=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-cygwin=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-darwin=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-dec_osf=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-os2=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-unix=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-vms=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-bcc=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-gcc=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-msvc=0.280.234"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-command=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-command-mm=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant=0.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-base=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-proxysubs=0.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-utils=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-xs=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-embed=1.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-install=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-installed=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-liblist=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-liblist-kid=7.440.100"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-config=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-locale=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-version=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-version-regex=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-manifest=1.720.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-miniperl=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mkbootstrap=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mksymlists=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_aix=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_any=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_beos=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_cygwin=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_darwin=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_dos=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_macos=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_nw5=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_os2=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_qnx=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_unix=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_uwin=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_vms=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_vos=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_win32=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_win95=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-my=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-packlist=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-constants=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-countlines=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-eval=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-utilities=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-testlib=7.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-cmd=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-inputmap=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-outputmap=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-type=3.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-xssymset=1.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fatal=2.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fcntl=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-feature=1.580.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fields=2.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-basename=2.850.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filecache=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-compare=1.100.600"
    "${MINGW_PACKAGE_PREFIX}-perl-file-copy=2.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-dosglob=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-fetch=0.560.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-find=1.370.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-glob=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-globmapper=1.1.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filehandle=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-path=2.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-amigaos=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-cygwin=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-epoc=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-functions=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-mac=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-os2=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-unix=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-vms=3.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-win32=3.790.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-stat=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-temp=0.230.900"
    "${MINGW_PACKAGE_PREFIX}-perl-filetest=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filter-simple=0.960.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filter-util-call=1.590.0"
    "${MINGW_PACKAGE_PREFIX}-perl-findbin=1.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-gdbm_file=1.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-getopt-long=2.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-getopt-std=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-hash-util=0.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-hash-util-fieldhash=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-http-tiny=0.76.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-collate=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langinfo=0.190.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags=0.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags-detect=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags-list=0.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-if=0.60.800"
    "${MINGW_PACKAGE_PREFIX}-perl-integer=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io=1.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-bzip2=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-deflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-identity=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-base=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-base-common=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-bzip2=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-deflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-gzip=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-gzip-constants=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-rawdeflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zip=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zip-constants=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zlib-constants=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zlib-extra=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-dir=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-file=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-handle=1.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-pipe=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-poll=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-seekable=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-select=1.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket=1.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-inet=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-ip=0.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-unix=1.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-bunzip2=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-identity=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-inflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-anyinflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-anyuncompress=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-base=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-bunzip2=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-gunzip=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-inflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-rawinflate=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-unzip=2.93.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-zlib=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-cmd=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-msg=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-open2=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-open3=1.210.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-semaphore=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-sharedmem=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-sysv=2.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-json-pp=4.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-json-pp-boolean=4.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-less=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-lib=0.650.0"
    "${MINGW_PACKAGE_PREFIX}-perl-list-util=1.550.0"
    "${MINGW_PACKAGE_PREFIX}-perl-list-util-xs=1.550.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext=1.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-guts=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-gutsloader=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-simple=0.210.100"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigfloat=1.999.818"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigfloat-trace=0.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint=1.999.818"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-calc=1.999.818"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-fastcalc=0.500.900"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-lib=1.999.818"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-trace=0.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigrat=0.261.400"
    "${MINGW_PACKAGE_PREFIX}-perl-math-complex=1.590.100"
    "${MINGW_PACKAGE_PREFIX}-perl-math-trig=1.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize=1.30.100"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-anydbm_file=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-expire=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-expirefile=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-expiretest=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-ndbm_file=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-sdbm_file=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-storable=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-meta_notation"
    "${MINGW_PACKAGE_PREFIX}-perl-mime-base64=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-mime-quotedprint=3.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-corelist=5.202.101.230"
    "${MINGW_PACKAGE_PREFIX}-perl-module-corelist-utils=5.202.101.230"
    "${MINGW_PACKAGE_PREFIX}-perl-module-load=0.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-load-conditional=0.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-loaded=0.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-metadata=1.0.37"
    "${MINGW_PACKAGE_PREFIX}-perl-moped-msg=0.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-mro=1.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ndbm_file=1.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-cmd=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-config=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-domain=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-a=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-dataconn=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-e=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-i=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-l=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-hostent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-netent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-netrc=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-nntp=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ping=2.720.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-pop3=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-protoent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-servent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-smtp=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-time=3.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-next=0.670.100"
    "${MINGW_PACKAGE_PREFIX}-perl-o=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-odbm_file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ok=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-opcode=1.480.0"
    "${MINGW_PACKAGE_PREFIX}-perl-open=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ops=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-dll=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-extattr=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-prfdb=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-process=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-rexx=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overload=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overloading=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overload-numbers"
    "${MINGW_PACKAGE_PREFIX}-perl-params-check=0.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-parent=0.238.0"
    "${MINGW_PACKAGE_PREFIX}-perl-parse-cpan-meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-perlfaq=5.202.5.230"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-encoding=0.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-mmap=0.16.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-scalar=0.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-via=0.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-via-quotedprint=0.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perl-ostype=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-checker=1.730.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-escapes=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-functions=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-functions-functions=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-html=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-man=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-parselink=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc=3.280.100"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-baseto=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-getoptsoo=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toansi=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tochecker=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toman=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tonroff=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-topod=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tortf=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toterm=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-totext=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-totk=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toxml=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-blackbox=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-checker=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-debug=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-dumpastext=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-dumpasxml=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-html=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-htmlbatch=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-htmllegacy=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-justpod"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-linksection=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-methody=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-progress=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparser=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparserendtoken=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparserstarttoken=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparsertexttoken=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparsertoken=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-rtf=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-search=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-simpletree=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-text=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-textcontent=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-tiedoutfh=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcode=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcodedumb=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcodesmart=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-xhtml=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-xmloutstream=3.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-color=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-overstrike=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-termcap=4.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-usage=1.690.0"
    "${MINGW_PACKAGE_PREFIX}-perl-posix=1.940.0"
    "${MINGW_PACKAGE_PREFIX}-perl-re=0.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-safe=2.410.100"
    "${MINGW_PACKAGE_PREFIX}-perl-scalar-util=1.550.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sdbm_file=1.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-search-dict=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-selectsaver=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-selfloader=1.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sigtrap=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-socket=2.29.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sort=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-storable=3.210.0"
    "${MINGW_PACKAGE_PREFIX}-perl-strict=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-subs=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sub-util=1.550.0"
    "${MINGW_PACKAGE_PREFIX}-perl-symbol=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-hostname=1.230.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-syslog=0.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-syslog-win32"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-base=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-base=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-color=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console-parallelsession=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console-session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-file=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-file-session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-session=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-harness=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-harness-env=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-object=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-aggregator=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-grammar=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-array=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iteratorfactory=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-process=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-stream=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-multiplexer=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-bailout=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-comment=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-resultfactory=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-plan=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-pragma=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-test=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-unknown=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-version=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-yaml=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler-job=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler-spinner=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-source=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-executable=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-file=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-handle=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-perl=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-rawtap=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-yamlish-reader=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-yamlish-writer=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-ansicolor=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-cap=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-complete=1.403.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-readline=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test2=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-breakage=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-context=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-instance=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-stack=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-bail=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-diag=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-encoding=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-exception=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-about=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-amnesty=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-assert=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-control=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-error=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-hub=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-info=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-info-table=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-meta=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-parent=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-plan=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-render=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-trace=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-fail=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-generic=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-note=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-ok=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-pass=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-plan=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-skip=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-subtest=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-tap-version=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-v2=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-waiting=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-formatter=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-formatter-tap=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-interceptor=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-interceptor-terminator=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-subtest=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc-driver=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc-driver-files=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-tools-tiny=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-externalmeta=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-facets2legacy=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-hashbase=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-trace=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-formatter=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-io-scalar=2.114.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-module=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tester=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tester-color=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tododiag=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-harness=3.420.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test-more=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-simple=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-capture=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-capturerunner=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-delegate=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-test-use-ok=1.302.175"
    "${MINGW_PACKAGE_PREFIX}-perl-text-abbrev=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-balanced=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-parsewords=3.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-tabs=2013.52.300"
    "${MINGW_PACKAGE_PREFIX}-perl-text-wrap=2013.52.300"
    "${MINGW_PACKAGE_PREFIX}-perl-thread=3.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-thread-queue=3.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads=2.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-thread-semaphore=2.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads-shared=1.610.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-array=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-file=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-handle=4.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-hash=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-hash-namedcapture=0.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-memoize=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-refhash=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-scalar=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-stdhandle=4.600.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-substrhash=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-gmtime=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-hires=1.976.400"
    "${MINGW_PACKAGE_PREFIX}-perl-time-local=1.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-localtime=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-piece=1.340.100"
    "${MINGW_PACKAGE_PREFIX}-perl-time-seconds=1.340.100"
    "${MINGW_PACKAGE_PREFIX}-perl-time-tm=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode=13.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-big5=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-gb2312=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-jisx0208=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-korean=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-pinyin=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-stroke=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-zhuyin=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-locale=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-normalize=1.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-ucd=0.750.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicore-name"
    "${MINGW_PACKAGE_PREFIX}-perl-universal=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-user-grent=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-user-pwent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-utf8=1.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vars=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-version=0.992.400"
    "${MINGW_PACKAGE_PREFIX}-perl-version-regex=0.992.400"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-dclsym=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-filespec=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vmsish=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-stdio=2.450.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings=1.470.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings-register=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-win32=0.530.0"
    "${MINGW_PACKAGE_PREFIX}-perl-win32api-file=0.120.301"
    "${MINGW_PACKAGE_PREFIX}-perl-win32api-file-inc-extutils-myconst2perl=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-win32core=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xs-apitest=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xsloader=0.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xs-typemap=0.170.0"
)
## End of pkgupdprovs modifications

sha256sums=('57cc47c735c8300a8ce2fa0643507b44c4ae59012bfdad0121313db639e02309'
            'a98fc21fb079a9b31194292191ea8be1590b97be16b57cc25c3cf73a5d2bd25e'
            'ec41f5054fcc61cd3f0942dc42fe24fcca50a9ff13cb42003b119e221a207d40'
            'c7cab5f7be8226487632a0b1e4f5fe1c859d7138f6fbc82bfc84ba3fa9864529'
            '3e77cbd055852f2646a237834a76facbb211c25b3a582efbbbcefab357294b1a'
            'd111f39ce2553bc65bdbbffc4fae5573d15d1c3b98c213fecc73079bf97c791f'
            '39dbdca9647e0e72733801e078d0d262940afea8bd48b767c224746e18e6f939'
            'ecf7d1e70976b25aad329ef7f77ddd6ba6c2efed3b94e30946e250d03cdd6d2e'
            'ff00fed8cd056e36d7f02a43f06feee10911fc2750773f139136426fb9af8b11'
            'b05767965076b59585343f3ea242baebeca2128c9485694155468664add023d0'
            'f0d33f057794ced071cad450b6d532ccd0b1c21fa73dedbc3a3c08563b4ad1dd'
            'd4d40153064f7fb541f5c526269af834d114b010250c549f2e0c71a553d2228a'
            '0d282638480937cb5b679a2046caa88309e79262dca62805e562b542e159806e'
            '9b6297d38f9fc1f34281f0f6c68c1b04009eb29b27f9c71d54c5047358388f55'
            'e19052547c9f8b9ce9d19236061fabbd1ffed9678d0089b1476344e70e51527c'
            '3964fc8e2915a55d298afb41b48872fca4abff11f6f96b74d2ea59d2ac787791'
            '68fc914809ab3402ed2afed110c18ae2934500026c23669e1e543edc58df45a2'
            '749e96f97a162c53f4cf7bda83d1b18f4d3e587e7980e07f5e8968943d6ea774'
            'ff48bfcf20ad9bf88aeabbb0a40a85ccbc294a87c769093147ed06e53db7be1b'
            '7861675f02698537f3ea99230b0d95ba9581253df258ebb81a528a3861b485ce'
            'f035f16f6d5e893f7d7af85fc10d9989920909686cf36b54559245997f80fdc3')

declare -rg _build="build-${CARCH}-${_realname}-${pkgver}"
declare -gA _destdir=()

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying $_patch"
    patch -Np1 -i "${srcdir}/$_patch"
  done
}

prepare() {
    cd "${srcdir}/${_realname}-${pkgver}"
    attrib.exe -R //S
    apply_patch_with_msg \
        001-fhs-directory-structure.patch \
        002-relocate-html-documentation.patch \
        003-replace-batch-scripts-with-bare-perl.patch \
        004-fix-cpan-external-programs.patch \
        005-rename-cpan-home.patch \
        006-generate-manpages.patch \
        007-use-winsock-socket-functions.patch \
        009-link-shared.patch \
        010-mingw-w64-triplet.patch \
        011-remove-s-compile-flag.patch \
        012-errno-gen-reduce-includes.patch \
        013-no-explib.patch \
        014-no-description-in-def.patch \
        015-noreturn.patch \
        016-memory-alignment.patch \
        017-arm64.patch \
        018-copy-clang-runtime.patch

    if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || [[ ${MINGW_PACKAGE_PREFIX} == *-ucrt-* ]]; then
        apply_patch_with_msg \
            008-ucrt-stdio-internals.patch
    fi

    if [[ -e "${srcdir}/${_build}" ]]; then
        local -i i=1
        while [[ -e "${srcdir}/${_build}~${i}" ]]; do ((++i)); done
        mv -T "${srcdir}/${_build}" "${srcdir}/${_build}~${i}"
    fi
    mv -T "${srcdir}/${_realname}-${pkgver}" "${srcdir}/${_build}"
    local postfix
    [[ "${CARCH}" == "x86_64" ]] && postfix="w64" || postfix="w32"
    sed -ri "/@@CPAN_HOME@@/{N;s/([\._])cpan/\1cpan-${postfix}/g;D}" \
        "${srcdir}/${_build}/cpan/CPAN/lib/CPAN/HandleConfig.pm"
}

_make() {
    # Please read README.win32 in the source package.
    # Using pkgdirbase here is not supported but required since we need the
    # package directory at build time, something which makepkg doesn't consider.
    : "${_destdir["core"]:="${pkgdirbase}/build-core"}"
    : "${_destdir["doc"]:="${pkgdirbase}/build-doc"}"
    local prefix="$(cygpath -w "${_destdir["core"]}${MINGW_PREFIX}")"
    local docprefix="$(cygpath -w "${_destdir["doc"]}${MINGW_PREFIX}")"
    local cchome="$(cygpath -w "${MINGW_PREFIX}")"
    local sysroot="$(cygpath -u "${SYSTEMROOT}")"
    local -i jobs="${JOBS:-$(nproc)}"
    local path="${sysroot}/system32:${sysroot}:${MINGW_PREFIX}/bin"
    # README.win32 recommends bulding under Windows' default shell (cmd.exe)
    # and win32/makefile.mk recommends setting SHELL to it as well
    local cmd="$(cygpath -u "${COMSPEC}")"
    local cmdline=(
        "${cmd}" //C mingw32-make
        -j"${jobs}"
        TEST_JOBS="${jobs}"
        CCTYPE=GCC
        CCHOME="${cchome}"
        INST_DRV="${prefix:0:2}"
        INST_TOP="${prefix}"
        INST_DOC="${docprefix}"
        USE_64_BIT_INT=define
        USE_MINGW_ANSI_STDIO=define
        SHELL="${COMSPEC}"
        PLMAKE=mingw32-make
    )
    if [[ "$(uname --machine)" == "x86_64" && "${CARCH}" == "i686" ]]; then
        cmdline+=(WIN64=undef)
    fi

    if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
      cmdline+=(EXTRACFLAGS="-Wno-compound-token-split-by-macro")
    fi

    if check_option "debug" "y"; then
      cmdline+=(CFG=Debug)
    fi
    cd "${srcdir}/${_build}/win32"
    msg2 "Running \"%s\"" "${cmdline[*]}$( (($#)) && echo -n " $*")"
    # Setting PATH here is not strictly necessary but it might make compilation
    # slightly faster to have the mostly used commands early on the PATH and
    # avoids interference with other programs on the PATH during tests.
    PATH="${path}" SHELL="" LC_ALL=C LANG=C "${cmdline[@]}" "$@"
}

build() {
    _make
}

check() {
    # Some tests will fail, this is expected on Windows. Still, it might be good
    # to have this information in the build logs.
    _make test || warning '%s' "
        Some of the tests failed, but this is more or less expected on Windows.
        Please consult the log files for specifics."
}

eval "package_${_pkgname["perl"]}() { _package_core; }" # perl
eval "package_${_pkgname["perl-doc"]}() { _package_doc; }"  # perl-doc

_package_common() {
    install="${pkgname}.install"

    pushd "${pkgdir}${MINGW_PREFIX}" &>/dev/null
    find -O3 . -type d -empty -delete

    # Path relocation. This is done by replacing hard-coded paths with relocate
    # patterns that will be resolved on package installation.

    local grep_args=() sed_args=() single= double= html= path=
    for path in "${_destdir[@]/%/\/}" /; do
        single="$(cygpath -w "${path}")"
        single="${single//\\/\\\\}"        # \  -> \\
        double="${single//\\\\/\\\\\\\\}"  # \\ -> \\\\
        html="${single//\\\\/\\\/}"        # \\ -> \/
        grep_args+=(
            -e "${html}"
            -e "${double}"
            -e "${single}"
        )
        sed_args+=(
            -e "s/${html}/@PERL_RELOCATE_HTML@\\//g"
            -e "s/${double}/@PERL_RELOCATE_DOUBLE@\\\\\\\\/g"
            -e "s/${single}/@PERL_RELOCATE@\\\\/g"
        )
    done

    msg2 "Creating relocate patterns for:"
    local -i i
    for ((i=0; i<${#grep_args[@]}; ++i)); do
        if ((i%2 == 1)); then
            plain "%b" "${grep_args[i]}"
        fi
    done

    # Attach list of files containing relocate patterns for use in post-install script.
    local relocate_list="$(mktemp)"
    grep -rilZ "${grep_args[@]}" . > "${relocate_list}"

    xargs -0 -a "${relocate_list}" sed -i "${sed_args[@]}"

    install -Dvm644 <(\
        sed -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlinstall.in
        gzip -c -9 "${relocate_list}" | base64
    ) "${startdir}/${install}"

    rm "${relocate_list}"
    popd &>/dev/null
}

_package_doc() {
    pkgdesc="Perl manpages and html documentation (mingw-64)"
    depends=()
    optdepends=("${_pkgname["perl"]}: Core package")
    provides=()

    mv -T "${_destdir["doc"]}" "${pkgdir}"
    _package_common
}

_package_core() {
    optdepends=("${_pkgname["perl-doc"]}: Extra manpages, perldocs and html documentation")
    _make install

    cd "${pkgdirbase}"
    attrib.exe -R //S

    msg2 "Cleaning up"
    find -O3 "${_destdir[@]}" \( -type f \( \
            -name '.packlist' -o -name 'perllocal.pod' -o -name '*.tmp' \
        \) -o -type d -empty \) -delete

    cd "${_destdir["core"]}${MINGW_PREFIX}"
    local config_heavy="$(find . -name Config_heavy.pl -print -quit)"

    local inst_bin="$(cygpath -u "$(sed -nr "s/^installbin='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_script="$(cygpath -u "$(sed -nr "s/^installscript='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_man="$(cygpath -u "$(sed -nr "s/^installman1dir='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local man1ext="$(cygpath -u "$(sed -nr "s/^man1ext='([^']+)'.*/\\1/p" "${config_heavy}")")"

    local patterns=() pathext=() ext=
    mapfile -d ';' -t pathext <<< "${PATHEXT}"
    mapfile -d $'\0' -t patterns < <(\
        find -O3 "$inst_bin" "$inst_script" -maxdepth 1 -type f -executable -print0
    )
    patterns=("${patterns[@]/#*\//\/}")
    for ext in "${pathext[@]}"; do
        patterns=("${patterns[@]%${ext,,}}")
    done
    patterns=("${patterns[@]/%/".${man1ext}"}")

    msg2 "Moving pods to documentation package"
    cd "${_destdir["core"]}"
    local pods=()
    mapfile -t -d $'\0' pods < <(\
        find -O3 . \( \
                -type d -name pods -o \
                -type f -name '*.pod' ! -iname 'Config.pod' ! -iname 'POSIX.pod' \
            \) -print0 -prune
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -rlpt "${_destdir["doc"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm -r
    fi

    msg2 "Moving manpages for core programs to core package"
    cd "${_destdir["doc"]}"
    mapfile -t -d $'\0' pods < <(\
        find -O3 ".${inst_man#"${PWD}"}" -maxdepth 1 -type f -print0 \
            | grep -zZFf <(printf '%s\n' "${patterns[@]}") \
        || true
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -lpt "${_destdir["core"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm
    fi

    mv -T "${_destdir["core"]}" "${pkgdir}"
    _package_common

    msg2 "Post-install configuration"
    cd "${pkgdir}${MINGW_PREFIX}"

    ### Perl Settings ###
    # Change man page extensions for site and vendor module builds.
    sed -i -e '/^man1ext=/ s/=.*/='"'"'1p'"'"'/' \
           -e '/^man3ext=/ s/=.*/='"'"'3pm'"'"'/' \
           "${config_heavy}"

    msg2 "Getting PATH components"
    local skip_paths=("${MINGW_PREFIX}/bin")
    local path_arr=()
    # Parse the configuration for paths that should be added to PATH
    # The sorting is a bit hacky...
    local p
    while IFS='' read -r p; do
        p="${p//\\/\/}"
        if [[ -n "${p}" \
              && ! "$(printf '%s\n' "${skip_paths[@]}" "${path_arr[@]}")" \
              =~ (^|$'\n')"${p}"($'\n'|$) ]]; then
            path_arr+=("${p}")
        fi
    done < <(\
        sed -nr \
            -e "s/^installsitebin='@PERL_.*?@(.*)'/1\\t\\1/p" \
            -e "s/^installsitescript='@PERL_.*?@(.*)'/2\\t\\1/p" \
            -e "s/^installvendorbin='@PERL_.*?@(.*)'/3\\t\\1/p" \
            -e "s/^installvendorscript='@PERL_.*?@(.*)'/4\\t\\1/p" \
            -e "s/^installbin='@PERL_.*?@(.*)'/5\\t\\1/p" \
            -e "s/^installscript='@PERL_.*?@(.*)'/6\\t\\1/p" \
            "${config_heavy}" \
        | sort -n -k1,1 | cut -f2- | uniq
    )
    local path="$(IFS=':'; echo "${path_arr[*]}")"

    msg2 "Adding extra files"
    local profile="/etc/profile.d/z-${_realname}-${MINGW_PACKAGE_PREFIX/mingw-w64-}.sh"
    install -Dvm644 <(sed \
            -e "/^\s*local\s\+mypath=/ s/=.*/=\"${path//\//\\\/}\"/" \
            -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "s/@FILENAME@/${profile//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlprofile.in) \
        "${pkgdir}${profile}"

    # Link perl executable to main bin directory
    local perldir="$(dirname "$(find ./bin -name "perl.exe" -print -quit)")"
    if [[ "${perldir}" != ./bin ]]; then
        ln -vt ./bin/ "${perldir}/perl"{.exe,5*.dll}
    fi

    # Add these so we have them on PATH before installing the first package
    # XXX: Is this a necessary?
    sed -nr \
        "s/^install(vendor|site)(bin|script|lib|arch|(man|html)[13]dir)='@PERL_.*?@(.*)'/\\4/p" \
        "${config_heavy}" \
        | sort | uniq | while IFS='' read -r p; do
            p="${pkgdir}${p//\\/\/}"; [[ -e "${p}" ]] || echo "${p}"
        done \
        | xargs -r install -dvm755

    # Licenses
    install -Dvm644 -t "share/licenses/${_realname}" "${srcdir}/${_build}/"{"Copying","Artistic"}
    # Other docs
    install -Dvm644 -t "share/doc/${_realname}"      "${srcdir}/${_build}/"{"README","Changes"}
}
